package com.blueocean_health.care.management.filter;

import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.filter.OncePerRequestFilter;

import com.blueocean_health.care.management.interceptor.ParameterRequestWrapper;
/**
 * 导出Excel去空格拦截器
 * @author wuyanli
 *
 */
@WebFilter(filterName="removeSpaceFilter",urlPatterns="/*") 
public class RemoveSpaceParamFilter extends OncePerRequestFilter {  
  
    @Override  
    protected void doFilterInternal(HttpServletRequest request,  
            HttpServletResponse response, FilterChain filterChain)  
            throws ServletException, IOException {  
			//只是我们自己写的param参数去除空格并写回的类
            ParameterRequestWrapper requestWrapper = new ParameterRequestWrapper(request);  
            filterChain.doFilter(requestWrapper, response);  
    }  
} 
